package models

import (
	"api/app/oa/auto/v1/mc"
	"api/libs/orm"
	"gitee.com/dreamwood/ez"
)

func (this TargetDept) TableName() string {
	return "oa_target_dept"
}

func (this TargetDept) MakeChoice() ez.M {
	return ez.M{"value": this.Id, "label": this.Id}
}

func init() {
	conf := mc.GetTargetDeptEzConfig()
	conf.Crud["default"] = orm.EzModelFieldLimitation{
		Select:    []string{}, //snake写法，多对一应该写xxx_id,关联关系不应该写在这里，使用Relations配置项
		Omit:      []string{}, //select优先级高于Omit,如果select和omit同时设置了，omit不生效
		Relations: []string{}, //大驼峰写法
	}
}
